package com.lixinyue.test07;

/**
 * @program: 11.12
 * @description:
 * @author: 李鑫月
 * @create: 2021-11-16 17:45
 **/
abstract class Shape{
    public abstract void draw();//抽象方法
}
abstract class A extends Shape{
    public abstract void funA();
}
class B extends A{
    @Override
    public void funA(){

    }
    @Override
    public void draw(){

    }
}
class Rect extends Shape{
    @Override
    public void draw(){
        System.out.println("♦");
    }
}
class Flower extends Shape {
    @Override
    public void draw(){
        System.out.println("❀");
    }
}

class Circle extends Shape {
    @Override
    public void draw() {
        System.out.println("●");
    }
}
public class Test {
    public static void DrawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
//        Shape shape=new Shape() {
//        }
        Shape shape=new Rect();
       DrawMap(shape);

    }
}
